package org.example.server.goods.mapstruct.goods.sku;

import org.example.api.goods.goods.request.AddGoodsRequest;
import org.example.server.goods.entity.GoodsSkuEntity;
import org.example.server.goods.repo.doo.GoodsSkuDo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface SkuConverter {
  /**
   * 转换实例
   */
  SkuConverter INSTANCE = Mappers.getMapper(SkuConverter.class);

  GoodsSkuEntity toGoodsSkuEntity(AddGoodsRequest.Sku sku, Long goodsId);

  List<GoodsSkuDo> toGoodsSkuDoFromEntity(List<GoodsSkuEntity> skuEntities);

}
